<template>
  <Child ref="child"></Child>
  <button @click="onChange">调节水温</button>
</template>

<script lang="ts" setup name="PersonRef">
import Child from '../components/child/Child.vue'
import {reactive,ref,watch, watchEffect} from 'vue'

let child=ref() //调用子模块中的数据

function onChange() {
  //打印子模块数据
  console.log(child.value.age);
  console.log(child.value.name);
}


</script>